{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "from pyecharts.charts import *\n",
    "from pyecharts import options as opts\n",
    "import matplotlib.pyplot as plt\n",
    "plt.rcParams['font.sans-serif'] = ['SimHei']\n",
    "from pyecharts.globals import ThemeType"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>地区</th>\n",
       "      <th>薪资</th>\n",
       "      <th>经验</th>\n",
       "      <th>公司名</th>\n",
       "      <th>公司领域</th>\n",
       "      <th>福利</th>\n",
       "      <th>详情页</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Python 开发工程师</td>\n",
       "      <td>北京</td>\n",
       "      <td>15-25K</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>广通优云</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>通讯补贴，交通补助，年终奖，餐补，节日福利，五险一金，定期体检，带薪年假</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Python 后台开发</td>\n",
       "      <td>上海·虹口区·四川北路</td>\n",
       "      <td>12-22K</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>维信金科</td>\n",
       "      <td>互联网金融</td>\n",
       "      <td>带薪年假，定期体检，零食下午茶，五险一金，节日福利，员工旅游，年终奖</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Python Developer</td>\n",
       "      <td>上海·长宁区·北新泾</td>\n",
       "      <td>11-22K</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>纬创软件</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>六险一金，节日福利，年终奖，五险一金，定期体检，礼金🧧，员工旅游，带薪年假</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Python 开发工程师</td>\n",
       "      <td>福州·马尾区·罗星</td>\n",
       "      <td>15-22K</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>福诺移动通信技术</td>\n",
       "      <td>互联网</td>\n",
       "      <td>年终奖，补充医疗保险，节日福利，餐补，带薪年假，加班补助，定期体检，零食下午茶，通讯补贴，交...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Python 软件开发工程师</td>\n",
       "      <td>武汉</td>\n",
       "      <td>18-35K·15薪</td>\n",
       "      <td>经验不限本科</td>\n",
       "      <td>华为</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>加班补助，定期体检，带薪年假，零食下午茶，年终奖，通讯补贴，交通补助，节日福利，五险一金，员...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 标题           地区          薪资      经验       公司名   公司领域  \\\n",
       "0      Python 开发工程师           北京      15-25K  3-5年本科      广通优云  计算机软件   \n",
       "1       Python 后台开发  上海·虹口区·四川北路      12-22K  1-3年本科      维信金科  互联网金融   \n",
       "2  Python Developer   上海·长宁区·北新泾      11-22K  1-3年本科      纬创软件  计算机软件   \n",
       "3      Python 开发工程师    福州·马尾区·罗星      15-22K  3-5年本科  福诺移动通信技术    互联网   \n",
       "4    Python 软件开发工程师           武汉  18-35K·15薪  经验不限本科        华为  计算机软件   \n",
       "\n",
       "                                                  福利  \\\n",
       "0               通讯补贴，交通补助，年终奖，餐补，节日福利，五险一金，定期体检，带薪年假   \n",
       "1                 带薪年假，定期体检，零食下午茶，五险一金，节日福利，员工旅游，年终奖   \n",
       "2              六险一金，节日福利，年终奖，五险一金，定期体检，礼金🧧，员工旅游，带薪年假   \n",
       "3  年终奖，补充医疗保险，节日福利，餐补，带薪年假，加班补助，定期体检，零食下午茶，通讯补贴，交...   \n",
       "4  加班补助，定期体检，带薪年假，零食下午茶，年终奖，通讯补贴，交通补助，节日福利，五险一金，员...   \n",
       "\n",
       "                                                 详情页  \n",
       "0  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "1  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "2  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "3  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "4  https://www.zhipin.com/https://www.zhipin.com/...  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('boss.csv', encoding='UTF-8') # 读取数据\n",
    "df.head() # 显示前五行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 411 entries, 0 to 410\n",
      "Data columns (total 8 columns):\n",
      " #   Column  Non-Null Count  Dtype \n",
      "---  ------  --------------  ----- \n",
      " 0   标题      411 non-null    object\n",
      " 1   地区      411 non-null    object\n",
      " 2   薪资      411 non-null    object\n",
      " 3   经验      411 non-null    object\n",
      " 4   公司名     411 non-null    object\n",
      " 5   公司领域    411 non-null    object\n",
      " 6   福利      409 non-null    object\n",
      " 7   详情页     411 non-null    object\n",
      "dtypes: object(8)\n",
      "memory usage: 25.8+ KB\n"
     ]
    }
   ],
   "source": [
    "df.info()#查看整体性描述"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>地区</th>\n",
       "      <th>薪资</th>\n",
       "      <th>经验</th>\n",
       "      <th>公司名</th>\n",
       "      <th>公司领域</th>\n",
       "      <th>福利</th>\n",
       "      <th>详情页</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>411</td>\n",
       "      <td>411</td>\n",
       "      <td>411</td>\n",
       "      <td>411</td>\n",
       "      <td>411</td>\n",
       "      <td>411</td>\n",
       "      <td>409</td>\n",
       "      <td>411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>unique</th>\n",
       "      <td>121</td>\n",
       "      <td>141</td>\n",
       "      <td>132</td>\n",
       "      <td>18</td>\n",
       "      <td>171</td>\n",
       "      <td>31</td>\n",
       "      <td>346</td>\n",
       "      <td>348</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>top</th>\n",
       "      <td>Python开发工程师</td>\n",
       "      <td>深圳·龙岗区·坂田</td>\n",
       "      <td>15-30K</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>华为</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>定期体检，节日福利，加班补助，交通补助，年终奖，股票期权，每年outing，每月团建费，通讯...</td>\n",
       "      <td>详情页</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>freq</th>\n",
       "      <td>66</td>\n",
       "      <td>19</td>\n",
       "      <td>32</td>\n",
       "      <td>155</td>\n",
       "      <td>33</td>\n",
       "      <td>160</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 标题         地区      薪资      经验  公司名   公司领域  \\\n",
       "count           411        411     411     411  411    411   \n",
       "unique          121        141     132      18  171     31   \n",
       "top     Python开发工程师  深圳·龙岗区·坂田  15-30K  3-5年本科   华为  计算机软件   \n",
       "freq             66         19      32     155   33    160   \n",
       "\n",
       "                                                       福利  详情页  \n",
       "count                                                 409  411  \n",
       "unique                                                346  348  \n",
       "top     定期体检，节日福利，加班补助，交通补助，年终奖，股票期权，每年outing，每月团建费，通讯...  详情页  \n",
       "freq                                                    4    4  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "62"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.duplicated().sum()#查看重复值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.drop_duplicates(inplace = True)#删除重复值\n",
    "df.duplicated().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "标题      0\n",
       "地区      0\n",
       "薪资      0\n",
       "经验      0\n",
       "公司名     0\n",
       "公司领域    0\n",
       "福利      2\n",
       "详情页     0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.isnull().sum()#查看空值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>地区</th>\n",
       "      <th>薪资</th>\n",
       "      <th>经验</th>\n",
       "      <th>公司名</th>\n",
       "      <th>公司领域</th>\n",
       "      <th>福利</th>\n",
       "      <th>详情页</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>Python服务器开发</td>\n",
       "      <td>成都</td>\n",
       "      <td>15-30K·15薪</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>百词斩</td>\n",
       "      <td>互联网</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>357</th>\n",
       "      <td>Python</td>\n",
       "      <td>北京·海淀区·中关村</td>\n",
       "      <td>15-25K·14薪</td>\n",
       "      <td>经验不限本科</td>\n",
       "      <td>搜狐集团</td>\n",
       "      <td>互联网</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              标题          地区          薪资      经验   公司名 公司领域   福利  \\\n",
       "62   Python服务器开发          成都  15-30K·15薪  3-5年本科   百词斩  互联网  NaN   \n",
       "357       Python  北京·海淀区·中关村  15-25K·14薪  经验不限本科  搜狐集团  互联网  NaN   \n",
       "\n",
       "                                                   详情页  \n",
       "62   https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "357  https://www.zhipin.com/https://www.zhipin.com/...  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['福利'].isnull()]#查看“福利”空值所属信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "标题      0\n",
       "地区      0\n",
       "薪资      0\n",
       "经验      0\n",
       "公司名     0\n",
       "公司领域    0\n",
       "福利      0\n",
       "详情页     0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['福利'].fillna('无',inplace=True)#用“无”填充福利列空值\n",
    "df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>地区</th>\n",
       "      <th>薪资</th>\n",
       "      <th>经验</th>\n",
       "      <th>公司名</th>\n",
       "      <th>公司领域</th>\n",
       "      <th>福利</th>\n",
       "      <th>详情页</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Python 开发工程师</td>\n",
       "      <td>北京</td>\n",
       "      <td>15-25K</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>广通优云</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>通讯补贴，交通补助，年终奖，餐补，节日福利，五险一金，定期体检，带薪年假</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Python 后台开发</td>\n",
       "      <td>上海·虹口区·四川北路</td>\n",
       "      <td>12-22K</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>维信金科</td>\n",
       "      <td>互联网金融</td>\n",
       "      <td>带薪年假，定期体检，零食下午茶，五险一金，节日福利，员工旅游，年终奖</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Python Developer</td>\n",
       "      <td>上海·长宁区·北新泾</td>\n",
       "      <td>11-22K</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>纬创软件</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>六险一金，节日福利，年终奖，五险一金，定期体检，礼金🧧，员工旅游，带薪年假</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Python 开发工程师</td>\n",
       "      <td>福州·马尾区·罗星</td>\n",
       "      <td>15-22K</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>福诺移动通信技术</td>\n",
       "      <td>互联网</td>\n",
       "      <td>年终奖，补充医疗保险，节日福利，餐补，带薪年假，加班补助，定期体检，零食下午茶，通讯补贴，交...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Python 软件开发工程师</td>\n",
       "      <td>武汉</td>\n",
       "      <td>18-35K·15薪</td>\n",
       "      <td>经验不限本科</td>\n",
       "      <td>华为</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>加班补助，定期体检，带薪年假，零食下午茶，年终奖，通讯补贴，交通补助，节日福利，五险一金，员...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>401</th>\n",
       "      <td>Python开发工程师</td>\n",
       "      <td>北京·海淀区·中关村</td>\n",
       "      <td>15-25K</td>\n",
       "      <td>经验不限本科</td>\n",
       "      <td>中科院自动化所</td>\n",
       "      <td>其他行业</td>\n",
       "      <td>全勤奖，餐补，节日福利，年终奖，定期体检，带薪年假，加班补助，通讯补贴，交通补助，补充医疗保...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>402</th>\n",
       "      <td>python研发工程师</td>\n",
       "      <td>北京·海淀区·五道口</td>\n",
       "      <td>20-40K·15薪</td>\n",
       "      <td>1-3年硕士</td>\n",
       "      <td>AutoX 无人驾驶</td>\n",
       "      <td>互联网</td>\n",
       "      <td>餐补，年终奖，零食下午茶，股票期权，五险一金，交通补助，节日福利，带薪年假，包吃，员工旅游，...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>403</th>\n",
       "      <td>Python开发工程师</td>\n",
       "      <td>北京·朝阳区·鸟巢</td>\n",
       "      <td>20-40K·14薪</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>电子商务</td>\n",
       "      <td>五险一金，包吃，交通补助，补充医疗保险，节日福利，年终奖，零食下午茶，餐补，员工旅游，带薪年...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>404</th>\n",
       "      <td>python开发工程师</td>\n",
       "      <td>深圳·南山区·科技园</td>\n",
       "      <td>20-35K·15薪</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>AKULAKU</td>\n",
       "      <td>互联网金融</td>\n",
       "      <td>零食下午茶，节日福利，五险一金，股票期权，带薪年假，年终奖，定期体检，加班补助</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>410</th>\n",
       "      <td>Python开发工程师</td>\n",
       "      <td>深圳·南山区·西丽</td>\n",
       "      <td>20-40K·14薪</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>深信服科技</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>超高标准假期，交通补助，补充医疗保险，餐补，通讯补贴，带薪年假，定期体检，年终奖，节日福利，...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>349 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                   标题           地区          薪资      经验         公司名   公司领域  \\\n",
       "0        Python 开发工程师           北京      15-25K  3-5年本科        广通优云  计算机软件   \n",
       "1         Python 后台开发  上海·虹口区·四川北路      12-22K  1-3年本科        维信金科  互联网金融   \n",
       "2    Python Developer   上海·长宁区·北新泾      11-22K  1-3年本科        纬创软件  计算机软件   \n",
       "3        Python 开发工程师    福州·马尾区·罗星      15-22K  3-5年本科    福诺移动通信技术    互联网   \n",
       "4      Python 软件开发工程师           武汉  18-35K·15薪  经验不限本科          华为  计算机软件   \n",
       "..                ...          ...         ...     ...         ...    ...   \n",
       "401       Python开发工程师   北京·海淀区·中关村      15-25K  经验不限本科     中科院自动化所   其他行业   \n",
       "402       python研发工程师   北京·海淀区·五道口  20-40K·15薪  1-3年硕士  AutoX 无人驾驶    互联网   \n",
       "403       Python开发工程师    北京·朝阳区·鸟巢  20-40K·14薪  3-5年本科        京东集团   电子商务   \n",
       "404       python开发工程师   深圳·南山区·科技园  20-35K·15薪  3-5年本科     AKULAKU  互联网金融   \n",
       "410       Python开发工程师    深圳·南山区·西丽  20-40K·14薪  1-3年本科       深信服科技  计算机软件   \n",
       "\n",
       "                                                    福利  \\\n",
       "0                 通讯补贴，交通补助，年终奖，餐补，节日福利，五险一金，定期体检，带薪年假   \n",
       "1                   带薪年假，定期体检，零食下午茶，五险一金，节日福利，员工旅游，年终奖   \n",
       "2                六险一金，节日福利，年终奖，五险一金，定期体检，礼金🧧，员工旅游，带薪年假   \n",
       "3    年终奖，补充医疗保险，节日福利，餐补，带薪年假，加班补助，定期体检，零食下午茶，通讯补贴，交...   \n",
       "4    加班补助，定期体检，带薪年假，零食下午茶，年终奖，通讯补贴，交通补助，节日福利，五险一金，员...   \n",
       "..                                                 ...   \n",
       "401  全勤奖，餐补，节日福利，年终奖，定期体检，带薪年假，加班补助，通讯补贴，交通补助，补充医疗保...   \n",
       "402  餐补，年终奖，零食下午茶，股票期权，五险一金，交通补助，节日福利，带薪年假，包吃，员工旅游，...   \n",
       "403  五险一金，包吃，交通补助，补充医疗保险，节日福利，年终奖，零食下午茶，餐补，员工旅游，带薪年...   \n",
       "404            零食下午茶，节日福利，五险一金，股票期权，带薪年假，年终奖，定期体检，加班补助   \n",
       "410  超高标准假期，交通补助，补充医疗保险，餐补，通讯补贴，带薪年假，定期体检，年终奖，节日福利，...   \n",
       "\n",
       "                                                   详情页  \n",
       "0    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "1    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "2    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "3    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "4    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "..                                                 ...  \n",
       "401  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "402  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "403  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "404  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "410  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "\n",
       "[349 rows x 8 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.rename(columns={'tags1':'涉及1','tags2':'涉及2','tags3':'涉及3','tags4':'涉及4','tags5':'涉及5','tags6':'涉及6'},inplace=True)#选择性重命名列名\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>地区</th>\n",
       "      <th>薪资</th>\n",
       "      <th>经验</th>\n",
       "      <th>公司名</th>\n",
       "      <th>公司领域</th>\n",
       "      <th>福利</th>\n",
       "      <th>详情页</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Python 开发工程师</td>\n",
       "      <td>北京</td>\n",
       "      <td>15-25K</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>广通优云</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>通讯补贴，交通补助，年终奖，餐补，节日福利，五险一金，定期体检，带薪年假</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Python 后台开发</td>\n",
       "      <td>上海·虹口区·四川北路</td>\n",
       "      <td>12-22K</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>维信金科</td>\n",
       "      <td>互联网金融</td>\n",
       "      <td>带薪年假，定期体检，零食下午茶，五险一金，节日福利，员工旅游，年终奖</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Python Developer</td>\n",
       "      <td>上海·长宁区·北新泾</td>\n",
       "      <td>11-22K</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>纬创软件</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>六险一金，节日福利，年终奖，五险一金，定期体检，礼金🧧，员工旅游，带薪年假</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Python 开发工程师</td>\n",
       "      <td>福州·马尾区·罗星</td>\n",
       "      <td>15-22K</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>福诺移动通信技术</td>\n",
       "      <td>互联网</td>\n",
       "      <td>年终奖，补充医疗保险，节日福利，餐补，带薪年假，加班补助，定期体检，零食下午茶，通讯补贴，交...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Python 软件开发工程师</td>\n",
       "      <td>武汉</td>\n",
       "      <td>18-35K·15薪</td>\n",
       "      <td>经验不限本科</td>\n",
       "      <td>华为</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>加班补助，定期体检，带薪年假，零食下午茶，年终奖，通讯补贴，交通补助，节日福利，五险一金，员...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>401</th>\n",
       "      <td>Python开发工程师</td>\n",
       "      <td>北京·海淀区·中关村</td>\n",
       "      <td>15-25K</td>\n",
       "      <td>经验不限本科</td>\n",
       "      <td>中科院自动化所</td>\n",
       "      <td>其他行业</td>\n",
       "      <td>全勤奖，餐补，节日福利，年终奖，定期体检，带薪年假，加班补助，通讯补贴，交通补助，补充医疗保...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>402</th>\n",
       "      <td>python研发工程师</td>\n",
       "      <td>北京·海淀区·五道口</td>\n",
       "      <td>20-40K·15薪</td>\n",
       "      <td>1-3年硕士</td>\n",
       "      <td>AutoX 无人驾驶</td>\n",
       "      <td>互联网</td>\n",
       "      <td>餐补，年终奖，零食下午茶，股票期权，五险一金，交通补助，节日福利，带薪年假，包吃，员工旅游，...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>403</th>\n",
       "      <td>Python开发工程师</td>\n",
       "      <td>北京·朝阳区·鸟巢</td>\n",
       "      <td>20-40K·14薪</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>电子商务</td>\n",
       "      <td>五险一金，包吃，交通补助，补充医疗保险，节日福利，年终奖，零食下午茶，餐补，员工旅游，带薪年...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>404</th>\n",
       "      <td>python开发工程师</td>\n",
       "      <td>深圳·南山区·科技园</td>\n",
       "      <td>20-35K·15薪</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>AKULAKU</td>\n",
       "      <td>互联网金融</td>\n",
       "      <td>零食下午茶，节日福利，五险一金，股票期权，带薪年假，年终奖，定期体检，加班补助</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>410</th>\n",
       "      <td>Python开发工程师</td>\n",
       "      <td>深圳·南山区·西丽</td>\n",
       "      <td>20-40K·14薪</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>深信服科技</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>超高标准假期，交通补助，补充医疗保险，餐补，通讯补贴，带薪年假，定期体检，年终奖，节日福利，...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>349 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                   标题           地区          薪资      经验         公司名   公司领域  \\\n",
       "0        Python 开发工程师           北京      15-25K  3-5年本科        广通优云  计算机软件   \n",
       "1         Python 后台开发  上海·虹口区·四川北路      12-22K  1-3年本科        维信金科  互联网金融   \n",
       "2    Python Developer   上海·长宁区·北新泾      11-22K  1-3年本科        纬创软件  计算机软件   \n",
       "3        Python 开发工程师    福州·马尾区·罗星      15-22K  3-5年本科    福诺移动通信技术    互联网   \n",
       "4      Python 软件开发工程师           武汉  18-35K·15薪  经验不限本科          华为  计算机软件   \n",
       "..                ...          ...         ...     ...         ...    ...   \n",
       "401       Python开发工程师   北京·海淀区·中关村      15-25K  经验不限本科     中科院自动化所   其他行业   \n",
       "402       python研发工程师   北京·海淀区·五道口  20-40K·15薪  1-3年硕士  AutoX 无人驾驶    互联网   \n",
       "403       Python开发工程师    北京·朝阳区·鸟巢  20-40K·14薪  3-5年本科        京东集团   电子商务   \n",
       "404       python开发工程师   深圳·南山区·科技园  20-35K·15薪  3-5年本科     AKULAKU  互联网金融   \n",
       "410       Python开发工程师    深圳·南山区·西丽  20-40K·14薪  1-3年本科       深信服科技  计算机软件   \n",
       "\n",
       "                                                    福利  \\\n",
       "0                 通讯补贴，交通补助，年终奖，餐补，节日福利，五险一金，定期体检，带薪年假   \n",
       "1                   带薪年假，定期体检，零食下午茶，五险一金，节日福利，员工旅游，年终奖   \n",
       "2                六险一金，节日福利，年终奖，五险一金，定期体检，礼金🧧，员工旅游，带薪年假   \n",
       "3    年终奖，补充医疗保险，节日福利，餐补，带薪年假，加班补助，定期体检，零食下午茶，通讯补贴，交...   \n",
       "4    加班补助，定期体检，带薪年假，零食下午茶，年终奖，通讯补贴，交通补助，节日福利，五险一金，员...   \n",
       "..                                                 ...   \n",
       "401  全勤奖，餐补，节日福利，年终奖，定期体检，带薪年假，加班补助，通讯补贴，交通补助，补充医疗保...   \n",
       "402  餐补，年终奖，零食下午茶，股票期权，五险一金，交通补助，节日福利，带薪年假，包吃，员工旅游，...   \n",
       "403  五险一金，包吃，交通补助，补充医疗保险，节日福利，年终奖，零食下午茶，餐补，员工旅游，带薪年...   \n",
       "404            零食下午茶，节日福利，五险一金，股票期权，带薪年假，年终奖，定期体检，加班补助   \n",
       "410  超高标准假期，交通补助，补充医疗保险，餐补，通讯补贴，带薪年假，定期体检，年终奖，节日福利，...   \n",
       "\n",
       "                                                   详情页  \n",
       "0    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "1    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "2    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "3    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "4    https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "..                                                 ...  \n",
       "401  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "402  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "403  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "404  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "410  https://www.zhipin.com/https://www.zhipin.com/...  \n",
       "\n",
       "[349 rows x 8 columns]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.fillna('未知',inplace=True)#用“未知”填充空值\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['北京', '上海', '福州', '武汉', '深圳', '厦门', '成都', '杭州', '沈阳', '南京', '广州',\n",
       "       '西安', '天津', '大连', '昆明', '惠州', '苏州', '哈尔滨', '淄博', '东莞', '邵阳', '廊坊',\n",
       "       '泰安', '中山', '重庆', '合肥', '保定', '地区', '珠海'], dtype=object)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['地区'] = df['地区'].apply(lambda x:x.split('·')[0])#获取地区\n",
    "df['地区'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['3-5年本科', '1-3年本科', '经验不限本科', '5-10年本科', '3-5年大专', '5-10年大专',\n",
       "       '1-3年大专', '经验不限学历不限', '3-5年硕士', '4天/周3个月本科', '在校/应届本科', '1-3年硕士',\n",
       "       '1年以内本科', '4天/周5个月本科', '经验', '10年以上本科', '4天/周8个月本科', '经验不限大专'],\n",
       "      dtype=object)"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['经验'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['3-5年本科', '1-3年本科', '经验不限本科', '5-10年本科', '经验不限大专', '1-3年大专',\n",
       "       '3-5年硕士', '4天/周3个月本科', '1-3年硕士', '1年以内本科', '4天/周5个月本科', '经验',\n",
       "       '10年以上本科', '4天/周8个月本科'], dtype=object)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['经验'].replace('在校/应届本科','经验不限本科', inplace=True)#重命名经验\n",
    "df['经验'].replace('5天/周2个月本科','经验不限本科', inplace=True)\n",
    "df['经验'].replace('经验不限学历不限','经验不限大专', inplace=True)\n",
    "df['经验'].replace('5天/周6个月大专','经验不限大专', inplace=True)\n",
    "df['经验'].replace('3天/周12个月本科','经验不限本科', inplace=True)\n",
    "df['经验'].replace('3天/周3个月硕士','经验不限硕士', inplace=True)\n",
    "df['经验'].replace('4天/周6个月硕士','经验不限硕士', inplace=True)\n",
    "df['经验'].replace('3-5年学历不限','经验不限大专', inplace=True)\n",
    "df['经验'].replace('5-10年大专','经验不限大专', inplace=True)\n",
    "df['经验'].replace('3-5年大专','经验不限大专', inplace=True)\n",
    "df['经验'].replace('5天/周6个月本科','经验不限本科', inplace=True)\n",
    "df['经验'].replace('5天/周6个月本科','经验不限本科', inplace=True)\n",
    "df['经验'].replace('                                                                                                                                                                                                                                                                    ','经验不限本科', inplace=True)\n",
    "df['经验'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['15-25K', '12-22K', '11-22K', '15-22K', '18-35K·15薪', '15-23K',\n",
       "       '12-24K', '15-30K·15薪', '25-30K', '11-20K', '25-50K·15薪', '12-20K',\n",
       "       '14-25K', '12-24K·14薪', '25-35K·13薪', '15-27K', '12-20K·13薪',\n",
       "       '20-30K', '18-30K·14薪', '14-25K·13薪', '15-25K·13薪', '17-28K·13薪',\n",
       "       '20-35K·13薪', '15-25K·15薪', '15-30K', '25-50K·14薪', '20-30K·13薪',\n",
       "       '20-25K·13薪', '25-40K·15薪', '13-22K', '8-13K', '20-25K',\n",
       "       '15-25K·14薪', '25-40K·14薪', '18-25K·14薪', '30-50K', '16-25K',\n",
       "       '16-22K', '6-7K', '25-50K·13薪', '20-40K·16薪', '13-26K', '10-15K',\n",
       "       '20-40K', '25-40K·16薪', '20-35K', '20-40K·14薪', '20-40K·15薪',\n",
       "       '25-45K·14薪', '15-20K', '30-60K·15薪', '16-30K·13薪', '13-20K·13薪',\n",
       "       '11-14K·13薪', '11-19K', '20-30K·15薪', '20-35K·15薪', '25-45K',\n",
       "       '150-200元/天', '15-30K·13薪', '13-23K', '12-24K·15薪', '30-60K·16薪',\n",
       "       '18-25K', '15-30K·14薪', '20-30K·14薪', '30-45K', '25-50K·16薪',\n",
       "       '13-17K', '19-23K·15薪', '12-17K·15薪', '25-50K', '17-25K',\n",
       "       '13-18K·13薪', '12-20K·15薪', '18-35K', '7-12K', '15-20K·13薪',\n",
       "       '15-30K·16薪', '20-30K·16薪', '11-16K·15薪', '15-18K·13薪',\n",
       "       '18-28K·14薪', '25-40K', '12-15K', '12-24K·13薪', '18-22K',\n",
       "       '15-22K·14薪', '22-40K·14薪', '30-60K·13薪', '13-15K', '14-28K·13薪',\n",
       "       '30-50K·16薪', '11-17K', '14-20K', '15-28K', '14-28K', '16-25K·14薪',\n",
       "       '12-18K·13薪', '22-35K·13薪', '13-26K·13薪', '20-40K·13薪', '10-11K',\n",
       "       '22-40K·16薪', '35-45K·16薪', '12-14K·13薪', '11-18K', '14-24K·14薪',\n",
       "       '11-21K', '30-60K', '19-35K·15薪', '20-28K·14薪', '18-30K', '14-22K',\n",
       "       '14-28K·16薪', '25-30K·16薪', '11-15K·13薪', '17-28K', '18-35K·16薪',\n",
       "       '13-20K·14薪', '薪资', '30-45K·13薪', '16-25K·13薪', '20-35K·16薪',\n",
       "       '30-50K·18薪', '19-30K·14薪', '200-300元/天', '28-45K·14薪',\n",
       "       '18-35K·13薪', '15-25K·16薪', '24-40K·15薪', '11-16K'], dtype=object)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['薪资'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>地区</th>\n",
       "      <th>薪资</th>\n",
       "      <th>经验</th>\n",
       "      <th>公司名</th>\n",
       "      <th>公司领域</th>\n",
       "      <th>福利</th>\n",
       "      <th>详情页</th>\n",
       "      <th>m_max</th>\n",
       "      <th>m_min</th>\n",
       "      <th>平均薪资</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Python 开发工程师</td>\n",
       "      <td>北京</td>\n",
       "      <td>15-25K</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>广通优云</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>通讯补贴，交通补助，年终奖，餐补，节日福利，五险一金，定期体检，带薪年假</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "      <td>15.0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>20.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Python 后台开发</td>\n",
       "      <td>上海</td>\n",
       "      <td>12-22K</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>维信金科</td>\n",
       "      <td>互联网金融</td>\n",
       "      <td>带薪年假，定期体检，零食下午茶，五险一金，节日福利，员工旅游，年终奖</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "      <td>12.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>17.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Python Developer</td>\n",
       "      <td>上海</td>\n",
       "      <td>11-22K</td>\n",
       "      <td>1-3年本科</td>\n",
       "      <td>纬创软件</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>六险一金，节日福利，年终奖，五险一金，定期体检，礼金🧧，员工旅游，带薪年假</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "      <td>11.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>16.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Python 开发工程师</td>\n",
       "      <td>福州</td>\n",
       "      <td>15-22K</td>\n",
       "      <td>3-5年本科</td>\n",
       "      <td>福诺移动通信技术</td>\n",
       "      <td>互联网</td>\n",
       "      <td>年终奖，补充医疗保险，节日福利，餐补，带薪年假，加班补助，定期体检，零食下午茶，通讯补贴，交...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "      <td>15.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>18.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Python 软件开发工程师</td>\n",
       "      <td>武汉</td>\n",
       "      <td>18-35K·15薪</td>\n",
       "      <td>经验不限本科</td>\n",
       "      <td>华为</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>加班补助，定期体检，带薪年假，零食下午茶，年终奖，通讯补贴，交通补助，节日福利，五险一金，员...</td>\n",
       "      <td>https://www.zhipin.com/https://www.zhipin.com/...</td>\n",
       "      <td>18.0</td>\n",
       "      <td>35.0</td>\n",
       "      <td>26.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 标题  地区          薪资      经验       公司名   公司领域  \\\n",
       "0      Python 开发工程师  北京      15-25K  3-5年本科      广通优云  计算机软件   \n",
       "1       Python 后台开发  上海      12-22K  1-3年本科      维信金科  互联网金融   \n",
       "2  Python Developer  上海      11-22K  1-3年本科      纬创软件  计算机软件   \n",
       "3      Python 开发工程师  福州      15-22K  3-5年本科  福诺移动通信技术    互联网   \n",
       "4    Python 软件开发工程师  武汉  18-35K·15薪  经验不限本科        华为  计算机软件   \n",
       "\n",
       "                                                  福利  \\\n",
       "0               通讯补贴，交通补助，年终奖，餐补，节日福利，五险一金，定期体检，带薪年假   \n",
       "1                 带薪年假，定期体检，零食下午茶，五险一金，节日福利，员工旅游，年终奖   \n",
       "2              六险一金，节日福利，年终奖，五险一金，定期体检，礼金🧧，员工旅游，带薪年假   \n",
       "3  年终奖，补充医疗保险，节日福利，餐补，带薪年假，加班补助，定期体检，零食下午茶，通讯补贴，交...   \n",
       "4  加班补助，定期体检，带薪年假，零食下午茶，年终奖，通讯补贴，交通补助，节日福利，五险一金，员...   \n",
       "\n",
       "                                                 详情页  m_max  m_min  平均薪资  \n",
       "0  https://www.zhipin.com/https://www.zhipin.com/...   15.0   25.0  20.0  \n",
       "1  https://www.zhipin.com/https://www.zhipin.com/...   12.0   22.0  17.0  \n",
       "2  https://www.zhipin.com/https://www.zhipin.com/...   11.0   22.0  16.5  \n",
       "3  https://www.zhipin.com/https://www.zhipin.com/...   15.0   22.0  18.5  \n",
       "4  https://www.zhipin.com/https://www.zhipin.com/...   18.0   35.0  26.5  "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['m_max'] = df['薪资'].str.extract('(\\d+)')#提取出最低薪资\n",
    "df['m_min'] = df['薪资'].str.extract('(\\d+)K')#提取出最高薪资\n",
    "df['m_max'] = df['m_max'].apply('float64')#转换数据类型\n",
    "df['m_min'] = df['m_min'].apply('float64')\n",
    "df['平均薪资'] = (df['m_max']+df['m_min'])/2\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'macarons':'https://assets.pyecharts.org/assets/themes/macarons'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"ffe121c199434208a6cabc2ed99faeb0\" style=\"width:800px; height:400px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'macarons'], function(echarts) {\n",
       "                var chart_ffe121c199434208a6cabc2ed99faeb0 = echarts.init(\n",
       "                    document.getElementById('ffe121c199434208a6cabc2ed99faeb0'), 'macarons', {renderer: 'canvas'});\n",
       "                var option_ffe121c199434208a6cabc2ed99faeb0 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                57,\n",
       "                11,\n",
       "                1,\n",
       "                1,\n",
       "                89,\n",
       "                13,\n",
       "                2,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                3,\n",
       "                2,\n",
       "                10,\n",
       "                1,\n",
       "                2,\n",
       "                16,\n",
       "                1,\n",
       "                27,\n",
       "                15,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                58,\n",
       "                2,\n",
       "                1,\n",
       "                3,\n",
       "                26,\n",
       "                1,\n",
       "                1\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"50%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"rotate\": -50,\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u4e1c\\u839e\",\n",
       "                \"\\u4e2d\\u5c71\",\n",
       "                \"\\u4fdd\\u5b9a\",\n",
       "                \"\\u5317\\u4eac\",\n",
       "                \"\\u5357\\u4eac\",\n",
       "                \"\\u53a6\\u95e8\",\n",
       "                \"\\u5408\\u80a5\",\n",
       "                \"\\u54c8\\u5c14\\u6ee8\",\n",
       "                \"\\u5730\\u533a\",\n",
       "                \"\\u5927\\u8fde\",\n",
       "                \"\\u5929\\u6d25\",\n",
       "                \"\\u5e7f\\u5dde\",\n",
       "                \"\\u5eca\\u574a\",\n",
       "                \"\\u60e0\\u5dde\",\n",
       "                \"\\u6210\\u90fd\",\n",
       "                \"\\u6606\\u660e\",\n",
       "                \"\\u676d\\u5dde\",\n",
       "                \"\\u6b66\\u6c49\",\n",
       "                \"\\u6c88\\u9633\",\n",
       "                \"\\u6cf0\\u5b89\",\n",
       "                \"\\u6dc4\\u535a\",\n",
       "                \"\\u6df1\\u5733\",\n",
       "                \"\\u73e0\\u6d77\",\n",
       "                \"\\u798f\\u5dde\",\n",
       "                \"\\u82cf\\u5dde\",\n",
       "                \"\\u897f\\u5b89\",\n",
       "                \"\\u90b5\\u9633\",\n",
       "                \"\\u91cd\\u5e86\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u6bcf\\u4e2a\\u5730\\u533a\\u7684\\u62db\\u8058\\u6570\\u91cf\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 80,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"dataZoom\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"type\": \"slider\",\n",
       "            \"realtime\": true,\n",
       "            \"start\": 20,\n",
       "            \"end\": 80,\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"zoomLock\": false,\n",
       "            \"filterMode\": \"filter\"\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_ffe121c199434208a6cabc2ed99faeb0.setOption(option_ffe121c199434208a6cabc2ed99faeb0);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x170e9e87580>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#每个地区的招聘数量\n",
    "dq = df.groupby('地区').count()['标题']\n",
    "dq_index = dq.index.tolist()\n",
    "dq_value = dq.values.tolist()\n",
    "\n",
    "bar1 = (Bar(init_opts=opts.InitOpts(width='800px', height='400px',theme=ThemeType.MACARONS))\n",
    "       .add_xaxis(dq_index)\n",
    "       .add_yaxis('', dq_value,category_gap=\"50%\")\n",
    "       .set_global_opts(title_opts=opts.TitleOpts(title=\"每个地区的招聘数量\"),\n",
    "                       xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(rotate=-50)),\n",
    "                        visualmap_opts=opts.VisualMapOpts(max_=80),#彩色块\n",
    "                        datazoom_opts=[opts.DataZoomOpts()]#拉动条形轴\n",
    "                        )\n",
    "      )\n",
    "bar1.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "salary_average = df.groupby('地区').mean()['平均薪资']\n",
    "salary_average.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "地区\n",
       "合肥    30.000000\n",
       "广州    26.600000\n",
       "北京    26.068966\n",
       "上海    24.383929\n",
       "深圳    23.051724\n",
       "苏州    22.166667\n",
       "东莞    21.727273\n",
       "武汉    21.133333\n",
       "杭州    21.018519\n",
       "重庆    21.000000\n",
       "Name: 平均薪资, dtype: float64"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "salary_average  = salary_average.sort_values(ascending=False)[:10]#找出平均薪资最高的十个地区\n",
    "salary_average"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'macarons':'https://assets.pyecharts.org/assets/themes/macarons'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"f8b256d247db49c68ce6212adaf61880\" style=\"width:800px; height:400px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'macarons'], function(echarts) {\n",
       "                var chart_f8b256d247db49c68ce6212adaf61880 = echarts.init(\n",
       "                    document.getElementById('f8b256d247db49c68ce6212adaf61880'), 'macarons', {renderer: 'canvas'});\n",
       "                var option_f8b256d247db49c68ce6212adaf61880 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                30.0,\n",
       "                26.6,\n",
       "                26.06896551724138,\n",
       "                24.383928571428573,\n",
       "                23.051724137931036,\n",
       "                22.166666666666668,\n",
       "                21.727272727272727,\n",
       "                21.133333333333333,\n",
       "                21.01851851851852,\n",
       "                21.0\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"50%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"rotate\": -40,\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u5408\\u80a5\",\n",
       "                \"\\u5e7f\\u5dde\",\n",
       "                \"\\u5317\\u4eac\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u6df1\\u5733\",\n",
       "                \"\\u82cf\\u5dde\",\n",
       "                \"\\u4e1c\\u839e\",\n",
       "                \"\\u6b66\\u6c49\",\n",
       "                \"\\u676d\\u5dde\",\n",
       "                \"\\u91cd\\u5e86\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"K\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5e73\\u5747\\u5de5\\u8d44\\u6700\\u9ad8\\u7684\\u5730\\u533a\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 30,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_f8b256d247db49c68ce6212adaf61880.setOption(option_f8b256d247db49c68ce6212adaf61880);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x170f707a3a0>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#平均工资最高的地区\n",
    "bar2 = (Bar(init_opts=opts.InitOpts(width='800px', height='400px',theme=ThemeType.MACARONS))#更改主题色\n",
    "       .add_xaxis(salary_average.index.tolist())\n",
    "       .add_yaxis('',salary_average.values.tolist(),category_gap=\"50%\")\n",
    "       .set_global_opts(title_opts=opts.TitleOpts(title=\"平均工资最高的地区\"),\n",
    "                       xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(rotate=-40)),\n",
    "                        visualmap_opts=opts.VisualMapOpts(max_=30),\n",
    "                        yaxis_opts=opts.AxisOpts(name='K')\n",
    "                        )\n",
    "        )\n",
    "        \n",
    "bar2.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "经验\n",
       "1-3年大专         5\n",
       "1-3年本科        67\n",
       "1-3年硕士         2\n",
       "10年以上本科        1\n",
       "1年以内本科         3\n",
       "3-5年本科       129\n",
       "3-5年硕士         2\n",
       "4天/周3个月本科      3\n",
       "4天/周5个月本科      1\n",
       "4天/周8个月本科      1\n",
       "5-10年本科       35\n",
       "经验             1\n",
       "经验不限大专        27\n",
       "经验不限本科        72\n",
       "Name: 标题, dtype: int64"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "jingyan = df.groupby('经验').count()['标题']\n",
    "jingyan"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'macarons':'https://assets.pyecharts.org/assets/themes/macarons'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"65b8bb3138d84d1193946c9a64f7eb7a\" style=\"width:1000px; height:600px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'macarons'], function(echarts) {\n",
       "                var chart_65b8bb3138d84d1193946c9a64f7eb7a = echarts.init(\n",
       "                    document.getElementById('65b8bb3138d84d1193946c9a64f7eb7a'), 'macarons', {renderer: 'canvas'});\n",
       "                var option_65b8bb3138d84d1193946c9a64f7eb7a = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"1-3\\u5e74\\u5927\\u4e13\",\n",
       "                    \"value\": 5\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"1-3\\u5e74\\u672c\\u79d1\",\n",
       "                    \"value\": 67\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"1-3\\u5e74\\u7855\\u58eb\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"10\\u5e74\\u4ee5\\u4e0a\\u672c\\u79d1\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"1\\u5e74\\u4ee5\\u5185\\u672c\\u79d1\",\n",
       "                    \"value\": 3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"3-5\\u5e74\\u672c\\u79d1\",\n",
       "                    \"value\": 129\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"3-5\\u5e74\\u7855\\u58eb\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"4\\u5929/\\u54683\\u4e2a\\u6708\\u672c\\u79d1\",\n",
       "                    \"value\": 3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"4\\u5929/\\u54685\\u4e2a\\u6708\\u672c\\u79d1\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"4\\u5929/\\u54688\\u4e2a\\u6708\\u672c\\u79d1\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"5-10\\u5e74\\u672c\\u79d1\",\n",
       "                    \"value\": 35\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7ecf\\u9a8c\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7ecf\\u9a8c\\u4e0d\\u9650\\u5927\\u4e13\",\n",
       "                    \"value\": 27\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7ecf\\u9a8c\\u4e0d\\u9650\\u672c\\u79d1\",\n",
       "                    \"value\": 72\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"40%\",\n",
       "                \"70%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{b}:{d}%\"\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"1-3\\u5e74\\u5927\\u4e13\",\n",
       "                \"1-3\\u5e74\\u672c\\u79d1\",\n",
       "                \"1-3\\u5e74\\u7855\\u58eb\",\n",
       "                \"10\\u5e74\\u4ee5\\u4e0a\\u672c\\u79d1\",\n",
       "                \"1\\u5e74\\u4ee5\\u5185\\u672c\\u79d1\",\n",
       "                \"3-5\\u5e74\\u672c\\u79d1\",\n",
       "                \"3-5\\u5e74\\u7855\\u58eb\",\n",
       "                \"4\\u5929/\\u54683\\u4e2a\\u6708\\u672c\\u79d1\",\n",
       "                \"4\\u5929/\\u54685\\u4e2a\\u6708\\u672c\\u79d1\",\n",
       "                \"4\\u5929/\\u54688\\u4e2a\\u6708\\u672c\\u79d1\",\n",
       "                \"5-10\\u5e74\\u672c\\u79d1\",\n",
       "                \"\\u7ecf\\u9a8c\",\n",
       "                \"\\u7ecf\\u9a8c\\u4e0d\\u9650\\u5927\\u4e13\",\n",
       "                \"\\u7ecf\\u9a8c\\u4e0d\\u9650\\u672c\\u79d1\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u7ecf\\u9a8c\\u5b66\\u5386\\u9700\\u6c42\\u56fe\",\n",
       "            \"left\": \"center\",\n",
       "            \"top\": \"center\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"black\",\n",
       "                \"fontWeight\": \"bold\",\n",
       "                \"fontSize\": 20\n",
       "            }\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_65b8bb3138d84d1193946c9a64f7eb7a.setOption(option_65b8bb3138d84d1193946c9a64f7eb7a);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x170f70e1430>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#经验学历需求图\n",
    "pair_1 = [(i, int(j)) for i, j in zip(jingyan.index,jingyan.values)]\n",
    "pie = (\n",
    "    Pie(init_opts=opts.InitOpts(theme=ThemeType.MACARONS,width='1000px',height='600px'))\n",
    "    \n",
    "    .add('', pair_1, radius=['40%', '70%'])\n",
    "    .set_series_opts(label_opts=opts.LabelOpts(formatter=\"{b}:{d}%\"))\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(\n",
    "            title=\"经验学历需求图\", \n",
    "            pos_left='center', \n",
    "            pos_top='center',\n",
    "            title_textstyle_opts=opts.TextStyleOpts(\n",
    "                color='black', \n",
    "                font_size=20, \n",
    "                font_weight='bold'\n",
    "            ),\n",
    "        )\n",
    "    )\n",
    "    \n",
    ")\n",
    "pie.render_notebook() "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'macarons':'https://assets.pyecharts.org/assets/themes/macarons'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"33e488e7b15048eea10217e2f318c3cb\" style=\"width:1500px; height:900px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'macarons'], function(echarts) {\n",
       "                var chart_33e488e7b15048eea10217e2f318c3cb = echarts.init(\n",
       "                    document.getElementById('33e488e7b15048eea10217e2f318c3cb'), 'macarons', {renderer: 'canvas'});\n",
       "                var option_33e488e7b15048eea10217e2f318c3cb = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"4S\\u5e97/\\u540e\\u5e02\\u573a\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"O2O\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e92\\u8054\\u7f51\",\n",
       "                    \"value\": 77\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e92\\u8054\\u7f51\\u91d1\\u878d\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4eba\\u529b\\u8d44\\u6e90\\u670d\\u52a1\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4f01\\u4e1a\\u670d\\u52a1\",\n",
       "                    \"value\": 5\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4fe1\\u606f\\u5b89\\u5168\",\n",
       "                    \"value\": 28\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u516c\\u53f8\\u9886\\u57df\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5176\\u4ed6\\u884c\\u4e1a\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u533b\\u7597\\u5065\\u5eb7\",\n",
       "                    \"value\": 5\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u533b\\u7597\\u8bbe\\u5907/\\u5668\\u68b0\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u54a8\\u8be2\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5728\\u7ebf\\u6559\\u80b2\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u57f9\\u8bad\\u673a\\u6784\",\n",
       "                    \"value\": 3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5bb6\\u5177/\\u5bb6\\u7535/\\u5bb6\\u5c45\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5de5\\u7a0b\\u65bd\\u5de5\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u544a/\\u516c\\u5173/\\u4f1a\\u5c55\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5efa\\u7b51\\u8bbe\\u8ba1\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6279\\u53d1/\\u96f6\\u552e\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6570\\u636e\\u670d\\u52a1\",\n",
       "                    \"value\": 4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65c5\\u6e38\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u667a\\u80fd\\u786c\\u4ef6\",\n",
       "                    \"value\": 4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e38\\u620f\",\n",
       "                    \"value\": 6\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7269\\u4e1a\\u670d\\u52a1\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7269\\u6d41/\\u4ed3\\u50a8\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7535\\u5b50\\u5546\\u52a1\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u79fb\\u52a8\\u4e92\\u8054\\u7f51\",\n",
       "                    \"value\": 19\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8ba1\\u7b97\\u673a\\u670d\\u52a1\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8ba1\\u7b97\\u673a\\u8f6f\\u4ef6\",\n",
       "                    \"value\": 146\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u901a\\u4fe1/\\u7f51\\u7edc\\u8bbe\\u5907\",\n",
       "                    \"value\": 11\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u94f6\\u884c\",\n",
       "                    \"value\": 1\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"20%\",\n",
       "                \"80%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"25%\",\n",
       "                \"70%\"\n",
       "            ],\n",
       "            \"roseType\": \"radius\",\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"4S\\u5e97/\\u540e\\u5e02\\u573a\",\n",
       "                \"O2O\",\n",
       "                \"\\u4e92\\u8054\\u7f51\",\n",
       "                \"\\u4e92\\u8054\\u7f51\\u91d1\\u878d\",\n",
       "                \"\\u4eba\\u529b\\u8d44\\u6e90\\u670d\\u52a1\",\n",
       "                \"\\u4f01\\u4e1a\\u670d\\u52a1\",\n",
       "                \"\\u4fe1\\u606f\\u5b89\\u5168\",\n",
       "                \"\\u516c\\u53f8\\u9886\\u57df\",\n",
       "                \"\\u5176\\u4ed6\\u884c\\u4e1a\",\n",
       "                \"\\u533b\\u7597\\u5065\\u5eb7\",\n",
       "                \"\\u533b\\u7597\\u8bbe\\u5907/\\u5668\\u68b0\",\n",
       "                \"\\u54a8\\u8be2\",\n",
       "                \"\\u5728\\u7ebf\\u6559\\u80b2\",\n",
       "                \"\\u57f9\\u8bad\\u673a\\u6784\",\n",
       "                \"\\u5bb6\\u5177/\\u5bb6\\u7535/\\u5bb6\\u5c45\",\n",
       "                \"\\u5de5\\u7a0b\\u65bd\\u5de5\",\n",
       "                \"\\u5e7f\\u544a/\\u516c\\u5173/\\u4f1a\\u5c55\",\n",
       "                \"\\u5efa\\u7b51\\u8bbe\\u8ba1\",\n",
       "                \"\\u6279\\u53d1/\\u96f6\\u552e\",\n",
       "                \"\\u6570\\u636e\\u670d\\u52a1\",\n",
       "                \"\\u65c5\\u6e38\",\n",
       "                \"\\u667a\\u80fd\\u786c\\u4ef6\",\n",
       "                \"\\u6e38\\u620f\",\n",
       "                \"\\u7269\\u4e1a\\u670d\\u52a1\",\n",
       "                \"\\u7269\\u6d41/\\u4ed3\\u50a8\",\n",
       "                \"\\u7535\\u5b50\\u5546\\u52a1\",\n",
       "                \"\\u79fb\\u52a8\\u4e92\\u8054\\u7f51\",\n",
       "                \"\\u8ba1\\u7b97\\u673a\\u670d\\u52a1\",\n",
       "                \"\\u8ba1\\u7b97\\u673a\\u8f6f\\u4ef6\",\n",
       "                \"\\u901a\\u4fe1/\\u7f51\\u7edc\\u8bbe\\u5907\",\n",
       "                \"\\u94f6\\u884c\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u62db\\u8058\\u516c\\u53f8\\u6240\\u5728\\u9886\\u57df\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_33e488e7b15048eea10217e2f318c3cb.setOption(option_33e488e7b15048eea10217e2f318c3cb);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x170f708fa60>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gongsi = df.groupby('公司领域').count()['标题']\n",
    "#招聘公司所在领域\n",
    "pie1 = (\n",
    "    Pie(init_opts=opts.InitOpts(theme=ThemeType.MACARONS,width='1500px',height='900px'))\n",
    "    .add(\n",
    "        \"\",\n",
    "        [list(z) for z in zip(gongsi.index.tolist(), gongsi.values.tolist())],\n",
    "        radius=[\"20%\", \"80%\"],\n",
    "        center=[\"25%\", \"70%\"],\n",
    "        rosetype=\"radius\",\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    ).set_global_opts(title_opts=opts.TitleOpts(title=\"招聘公司所在领域\"))\n",
    ")\n",
    "pie1.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
